package com.cloud.advance.openandclose;

import com.cloud.advance.openandclose.imp.AreaExt;
import com.cloud.advance.openandclose.imp.CalculationArea;
import org.junit.Test;

public class testOc {

    // 里氏替换原则  继承必须保证超类所拥的子类中依然成立。(与开闭原则相近)
    @Test
    public void cal(){
        AreaExt areaExt = new AreaExt();
        double circle = areaExt.circle(22d);
        System.out.println(circle);
    }

    @Test
    public void cal1(){
        CalculationArea calculationArea = new CalculationArea();
        double circle = calculationArea.circle(22d);
        System.out.println(circle);
    }
}
